JavascriptExecutor js=(JavascriptExecutor) oBrowser;
js.executeScript("scroll(0,250)");        //scroll down
Thread.sleep(2000);
js.executeScript("scroll(0,-250)");      //scroll up
=======================================================
JavascriptExecutor js = (JavascriptExecutor ) oBrowser;

//Scroll the page 400 pixel down
js.executeScript("scroll(0, 400)");

 

 //Scroll the page 400 pixel up
js.executeScript("scroll(0, -400)");  



//Scroll the page 400 pixel to the right
js.executeScript("scroll(400, 0)");



//Scroll the page 400 pixel to the left
js.executeScript("scroll(-400, 0)");



//Scroll the WebElement into view
Webelement element = oBrowser.findElement(By.id("username"));
js.executeScript("arguments[0].scrollIntoView();", element);



//Scroll to the bottom of the page
js.executeScript("window.scrollTo(0, document.body.scrollHeight)");



//Scroll to the top of the page
js.executeScript("window.scrollTo(document.body.scrollHeight, 0)");